home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / VideoToolbox 96.06.15 / (Notes) / AV Macs & frame grabbing.doc next >
Text File  |  1994-11-30  |  5KB  |  96 lines

  1. [Daniel Sears passed this on for inclusion in the VideoToolbox. dgp 11/94]
  2.  
  3. AV Macs & Framegrabbing - the inside story.
  4. ----------------------------------------
  5.  
  6. Please feel free to correct any points in this message you know to be wrong.
  7.  
  8. Over the past two months I have been agonising over whether to buy an AV Mac for
  9. the Physics Lab I work in.  The aim would be to grab greyscale images of
  10. diffraction patterns and analyse the relative intensities of diffraction spots.
  11. This requires digitising into 256 grey levels to provide the necessary greyscale
  12. resolution.
  13.  
  14. In order to see whether the AVs were suitable for this I looked in detail at the
  15. hardware specs of these machines as described in Apple's developer note.  This
  16. note gives a circuit diagram of the digitiser hardware, including chip numbers. 
  17. They have used a number of Philips chips to handle the digitisation.  I went out
  18. and bought myself the Philips technical notes for these chips, and what follows
  19. is a summary of the AV Macs digitisers.  It may be that Apple are using these
  20. chips in a non-standard way that might invalidate some of the comments I am going
  21. to make, but there appears to be no detailed information, other than that found
  22. in the developer note, on the built-in digitiser's hardware and performance.
  23.  
  24. (1)  The chip set used for digitisation in the AV Macs are primarily used in
  25. standard TV applications where quality and faithful rendition of the digitised
  26. image are governed by the response of the human eye which is fairly tolerant.
  27.  
  28. (2)  The 8-bit (256 levels) analog-to-digital converters (ADC) (Philips chips
  29. TDA8708 & TDA8709) that digitise the incoming video signal also digitise the
  30. synchronisation pulses in the video signal.  In particular the first 64 levels of
  31. grey are used for the sync pulses, and the top 16 levels of grey are never used. 
  32. This means that the effective resolution available for video digitisation is only
  33. 176 levels. This may be OK for TV applications but is only suitable for a limited
  34. range of scientific purposes.
  35.  
  36. (3) The ADC's have an automatic gain control (AGC) feature which appears to be
  37. enabled.  This will automatically alter the gain of the ADCs depending on the
  38. average level of the video signal.  So as the images get darker the gain goes up,
  39. as they get lighter the gain goes down.  There appears to be no way to adjust the
  40. gain or contrast of the digitised image from software (see Apple's own
  41. VideoMonitor where the brightness & contrast controls have little or no effect).
  42.  
  43. (4) The digitised video is then passed to another Philips chip (SAA7191) for
  44. converting the input digital video standard (PAL, NTSC, SECAM etc) into a
  45. standard YUV 4:2:2 signal as defined by the CCIR-601 standard.  During this
  46. process it maps the digitised luminance (brightness) levels from 64 -> 240 (as
  47. produced by the ADCs) to 16 -> 235 which will correspond to the black -> white
  48. level range.  In other words it interpolates from 170 levels of grey to 220
  49. levels of grey.  This is definitely bad news for scientific image grabbing where
  50. true 8-bit images are required. The chrominance (colour) levels are mapped in a
  51. similar way, however the chrominance is unimportant for greyscale images.
  52.  
  53. (5)  The final chip (Philips SAA7186) converts the YUV 4:2:2 digital signal into
  54. RGB suitable for stuffing into video memory. It can apply an optional gamma
  55. correction of 1.4 to the digitised image, thus changing the linearity of the
  56. luminance signal.  The gamma correction may be turned off, but this depends on
  57. the software being used.
  58.  
  59. Conclusions:
  60.  
  61. (1) The built-in digitisers of the AV Macs are not suitable for scientific image
  62. grabbing where a true rendition of the images' INTENSITY is required at 8-bit
  63. resolution. However, it is suitable for scientific applications which are not
  64. sensitive to brightness levels eg: finding shapes, areas, sizes of objects,
  65. detecting particles and counting them, recognising markings etc.
  66.  
  67. (2) There is no hardware or software solution to these problems, other than
  68. buying a suitable NuBus frame grabber card.
  69.  
  70. Suggestions for scientists:
  71.  
  72. MAKE SURE YOU KNOW EXACTLY WHAT YOUR DIGITISER DOES WHEN IT DIGITISES YOUR VIDEO
  73. SIGNAL.
  74.  
  75. If it is an 8-bit digitiser then its digitisation range must be from the video
  76. signal's black level voltage to its white level voltage giving a 0 -> 255 digital
  77. range.  If it digitises the sync pulses, it will reduce the black -> white level
  78. digitisation range. Any gamma correction will degrade the quality of your data
  79. (unless you can turn it off).
  80.  
  81. Any AGC will degrade the quality of your data (unless you can turn it off).
  82.  
  83. This summary has been based on a great deal of investigation into the hardware
  84. that the AV Macs use for digitisation.  I hope it all correct, but I'm more than
  85. happy to be corrected if its not.  Please mail me with any comments you may have
  86. that might clarify or add to those described above.
  87.  
  88. Thanks to Nick Safford for his comments and corrections.
  89.  
  90. Cyrus Daboo,
  91. University of Cambridge,
  92. UK.
  93.  
  94. Tel: +44 223 337006
  95. e-mail: cd102@phy.cam.ac.uk
  96.